package com.thermofisher.dsc.amanda.customer.mapper;

import com.thermofisher.dsc.amanda.common.BaseMapper;
import com.thermofisher.dsc.amanda.model.dto.customer.CustomerDto;
import com.thermofisher.dsc.amanda.model.po.auth.User;
import com.thermofisher.dsc.amanda.model.po.company.Company;
import com.thermofisher.dsc.amanda.model.po.company.Revenue;
import com.thermofisher.dsc.amanda.model.po.customer.Customer;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author  wenjie.yang on 1/3/2019.
 */
public interface CustomerMapper extends BaseMapper<Customer>{

  Double getEmployeeAvg();

  List<Integer> getEmployeeNumberAsc();

  void insertSql(@Param("sql") String sql);

  List<User> getTopSales(@Param("companyId") Long companyId);

  List<Revenue> getRevenueDataByCompanyId(@Param("companyId") Long companyId, @Param("startYear") String startYear);

  List<String> getArea(@Param("province") String province);

  List<String> getCompanyTypes();

  List<String> getCompanyResearchProdStatus();

  List<String> getCompanyfoundedYear();

  List<Customer> getCustomers(@Param("start") int page, @Param("end") int length, @Param("query") String query, @Param("email") String email);

  Long countCustomers(@Param("query") String query, @Param("email") String email);
}
